package user;

import book.BookList;
import ioperation.*;

public class NormalUser extends User{
    @Override
    public void menu() {
        System.out.println("亲爱的"+name+"用户，欢迎来到图书管理系统!");
        System.out.println("请选择你的操作:");
        System.out.println("1.借阅书籍");
        System.out.println("2.归还书籍");
        System.out.println("3.查找书籍");
        System.out.println("0.退出系统");
    }


    public NormalUser(){
        this.bookListOperations = new IOperation[4];
        bookListOperations[0] = new ExitOperation();
        bookListOperations[1] = new BorrowOperation();
        bookListOperations[2] = new ReturnOperation();
        bookListOperations[3] = new FindOperation();
    }
    public void callPosMethod(int choice,BookList bookList){
        bookListOperations[choice].word(bookList);
    }

}
